/*
 * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <tencentcloud/cwp/v20180228/model/ModifyMalwareTimingScanSettingsRequest.h>
#include <tencentcloud/core/utils/rapidjson/document.h>
#include <tencentcloud/core/utils/rapidjson/writer.h>
#include <tencentcloud/core/utils/rapidjson/stringbuffer.h>

using namespace TencentCloud::Cwp::V20180228::Model;
using namespace rapidjson;
using namespace std;

ModifyMalwareTimingScanSettingsRequest::ModifyMalwareTimingScanSettingsRequest() :
    m_checkPatternHasBeenSet(false),
    m_startTimeHasBeenSet(false),
    m_endTimeHasBeenSet(false),
    m_isGlobalHasBeenSet(false),
    m_enableScanHasBeenSet(false),
    m_monitoringPatternHasBeenSet(false),
    m_cycleHasBeenSet(false),
    m_realTimeMonitoringHasBeenSet(false),
    m_quuidListHasBeenSet(false)
{
}

string ModifyMalwareTimingScanSettingsRequest::ToJsonString() const
{
    Document d;
    d.SetObject();
    Document::AllocatorType& allocator = d.GetAllocator();


    if (m_checkPatternHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "CheckPattern";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, m_checkPattern, allocator);
    }

    if (m_startTimeHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "StartTime";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, Value(m_startTime.c_str(), allocator).Move(), allocator);
    }

    if (m_endTimeHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "EndTime";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, Value(m_endTime.c_str(), allocator).Move(), allocator);
    }

    if (m_isGlobalHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "IsGlobal";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, m_isGlobal, allocator);
    }

    if (m_enableScanHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "EnableScan";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, m_enableScan, allocator);
    }

    if (m_monitoringPatternHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "MonitoringPattern";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, m_monitoringPattern, allocator);
    }

    if (m_cycleHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "Cycle";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, m_cycle, allocator);
    }

    if (m_realTimeMonitoringHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "RealTimeMonitoring";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, m_realTimeMonitoring, allocator);
    }

    if (m_quuidListHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "QuuidList";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, Value(kArrayType).Move(), allocator);

        for (auto itr = m_quuidList.begin(); itr != m_quuidList.end(); ++itr)
        {
            d[key.c_str()].PushBack(Value().SetString((*itr).c_str(), allocator), allocator);
        }
    }


    StringBuffer buffer;
    Writer<StringBuffer> writer(buffer);
    d.Accept(writer);
    return buffer.GetString();
}


uint64_t ModifyMalwareTimingScanSettingsRequest::GetCheckPattern() const
{
    return m_checkPattern;
}

void ModifyMalwareTimingScanSettingsRequest::SetCheckPattern(const uint64_t& _checkPattern)
{
    m_checkPattern = _checkPattern;
    m_checkPatternHasBeenSet = true;
}

bool ModifyMalwareTimingScanSettingsRequest::CheckPatternHasBeenSet() const
{
    return m_checkPatternHasBeenSet;
}

string ModifyMalwareTimingScanSettingsRequest::GetStartTime() const
{
    return m_startTime;
}

void ModifyMalwareTimingScanSettingsRequest::SetStartTime(const string& _startTime)
{
    m_startTime = _startTime;
    m_startTimeHasBeenSet = true;
}

bool ModifyMalwareTimingScanSettingsRequest::StartTimeHasBeenSet() const
{
    return m_startTimeHasBeenSet;
}

string ModifyMalwareTimingScanSettingsRequest::GetEndTime() const
{
    return m_endTime;
}

void ModifyMalwareTimingScanSettingsRequest::SetEndTime(const string& _endTime)
{
    m_endTime = _endTime;
    m_endTimeHasBeenSet = true;
}

bool ModifyMalwareTimingScanSettingsRequest::EndTimeHasBeenSet() const
{
    return m_endTimeHasBeenSet;
}

uint64_t ModifyMalwareTimingScanSettingsRequest::GetIsGlobal() const
{
    return m_isGlobal;
}

void ModifyMalwareTimingScanSettingsRequest::SetIsGlobal(const uint64_t& _isGlobal)
{
    m_isGlobal = _isGlobal;
    m_isGlobalHasBeenSet = true;
}

bool ModifyMalwareTimingScanSettingsRequest::IsGlobalHasBeenSet() const
{
    return m_isGlobalHasBeenSet;
}

uint64_t ModifyMalwareTimingScanSettingsRequest::GetEnableScan() const
{
    return m_enableScan;
}

void ModifyMalwareTimingScanSettingsRequest::SetEnableScan(const uint64_t& _enableScan)
{
    m_enableScan = _enableScan;
    m_enableScanHasBeenSet = true;
}

bool ModifyMalwareTimingScanSettingsRequest::EnableScanHasBeenSet() const
{
    return m_enableScanHasBeenSet;
}

uint64_t ModifyMalwareTimingScanSettingsRequest::GetMonitoringPattern() const
{
    return m_monitoringPattern;
}

void ModifyMalwareTimingScanSettingsRequest::SetMonitoringPattern(const uint64_t& _monitoringPattern)
{
    m_monitoringPattern = _monitoringPattern;
    m_monitoringPatternHasBeenSet = true;
}

bool ModifyMalwareTimingScanSettingsRequest::MonitoringPatternHasBeenSet() const
{
    return m_monitoringPatternHasBeenSet;
}

uint64_t ModifyMalwareTimingScanSettingsRequest::GetCycle() const
{
    return m_cycle;
}

void ModifyMalwareTimingScanSettingsRequest::SetCycle(const uint64_t& _cycle)
{
    m_cycle = _cycle;
    m_cycleHasBeenSet = true;
}

bool ModifyMalwareTimingScanSettingsRequest::CycleHasBeenSet() const
{
    return m_cycleHasBeenSet;
}

uint64_t ModifyMalwareTimingScanSettingsRequest::GetRealTimeMonitoring() const
{
    return m_realTimeMonitoring;
}

void ModifyMalwareTimingScanSettingsRequest::SetRealTimeMonitoring(const uint64_t& _realTimeMonitoring)
{
    m_realTimeMonitoring = _realTimeMonitoring;
    m_realTimeMonitoringHasBeenSet = true;
}

bool ModifyMalwareTimingScanSettingsRequest::RealTimeMonitoringHasBeenSet() const
{
    return m_realTimeMonitoringHasBeenSet;
}

vector<string> ModifyMalwareTimingScanSettingsRequest::GetQuuidList() const
{
    return m_quuidList;
}

void ModifyMalwareTimingScanSettingsRequest::SetQuuidList(const vector<string>& _quuidList)
{
    m_quuidList = _quuidList;
    m_quuidListHasBeenSet = true;
}

bool ModifyMalwareTimingScanSettingsRequest::QuuidListHasBeenSet() const
{
    return m_quuidListHasBeenSet;
}


